<!doctype html>
<html>
<head>
    <include file="Public/head"/>
    <link href="__CSS__/main.css" rel="stylesheet" type="text/css" />
    <link href="__CSS__/index.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="__STATIC__/jquery/jquery-2.1.4.min.js"></script>

</head>

<body>
<header id="header">
    <div class="header_l"> <a class="ico_10" href="{:U('Center/index')}"> 返回 </a> </div>
    <h1 style="line-height: 50px;">我的收藏</h1>
    <!--<div class="header_r"><a class="edit" href="{:U('Center/collection_edit')}" style="text-indent:0;line-height: 50px;font-size: 16px;">编辑</a></div>-->

    <div class="header_r"><a class="edit" href="/" style="text-indent:0;line-height: 50px;font-size: 16px;">首页</a></div>
</header>

<div class="collection-content">
    <div class="invalid">
        <a href="{:U('Center/collection')}" class="<if condition="I('fade','') eq ''">invalid-btn1<else/>invalid-btn2</if>">全部</a>
        <a href="{:U('Center/collection',array('fade'=>'fade'))}" class="<if condition="I('fade','') eq ''">invalid-btn2<else/>invalid-btn1</if>">失效</a>
        <!--<a href="" class="invalid-btn2">收藏类目</a>-->
        <!--<a class="edit2 fr" href="{:U('Center/collection_edit')}">编辑</a>-->
    </div>

    <volist name="collections" id="collection">
        <if condition="( $collection['goods_pubend'] eq 0 or $collection['goods_pubend'] gt time()) and $collection['goods_id'] gt 0">
            <div class="cart-good" style="border-top:none;">
                <a href="{:U('Goods/detail',array('id'=>$collection['goods_id']))}">
                    <img src="http://{:C('DOMAIN')}{:get_item_imgs($collection['goods_multimage'],1,'path')['path']}">
                    <div class="good-data" style="width:68%;">
                        <p>{$collection.goods_title}</p>
                            <p class="color-red"><span class="size">￥{$collection.goods_price}</span></p>
                        <a class="fr invalid-btn4 cancel" style="line-height: 28px;" href="{:U('Center/collection_delete',array('collection_id'=>$collection['id']))}">取消收藏</a>
                    </div>
                </a>
            </div>
        <else/>
            <div class="cart-good" style="border-top:none;">
                <a>
                    <img src="http://{:C('DOMAIN')}{:get_item_imgs($collection['goods_multimage'],1,'path')['path']}">
                    <div class="good-data" style="width:68%;">
                        <p>{$collection.goods_title}</p>
                            <a class="invalid-btn3">失效</a>
                            <p class="color-red"><span class="size">￥--</span></p>
                        <a class="fr invalid-btn4 cancel" style="line-height: 28px;" href="{:U('Center/collection_delete',array('collection_id'=>$collection['id']))}">取消收藏</a>
                    </div>
                </a>
            </div>
        </if>
    </volist>

</div>
<script>
    $(function(){
        $(document).on("click",".cancel",function(e){
            confirm("确定要取消收藏吗？")?true:e.preventDefault();
        });
    });
</script>


</body>
</html>
